home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / utils3 / deskmen / Convert (.txt) next >
RISC OS BBC BASIC V Source  |  1994-01-24  |  1KB  |  44 lines

  1.  Menu file converter
  2.  Converts DeskMen menu files to text
  3.  Written by Ian Clark
  4.  (c) 1994 Ian Clark
  5. $+" ("+
  6.     t$=""
  7. "DeskMen menu file to text converter."
  8. "By and (c) 1994 Ian Clark"
  9. "------------------------------------"'
  10. "Please enter the name of the file to convert."
  11. "If you just press <Return> then the default of"
  12. "'<DMen$Dir>.MenuDef' will be used."'
  13. "File to convert =>"in$
  14.  in$="" 
  15.  in$="<DMen$Dir>.MenuDef"
  16. '"Now enter the output file, default 'Converted'"'
  17. "Output as  =>"out$
  18.  out$="" 
  19.  out$="Converted"
  20. "XOS_File",17,in$ 
  21.  ,,,,len%;error%
  22.  error% 
  23.  0,"I can't read that file! Does it exist?"
  24.  block% len%
  25. "OS_File",16,in$,block%,0
  26.  x%=0 
  27. (block%?x%)
  28.  t$<>"MENU" 
  29.  '"Old style menu file"
  30.  x%=0 
  31.  len%
  32. block%?x%=block%?x%>>>1
  33.  block%?x%=0 block%?x%=10
  34. block%-=4
  35. len%+=4
  36.  '"New style menu file"
  37.  x%=4 
  38.  len%
  39. block%?x%=block%?x% 
  40.  block%?x%=0 block%?x%=10
  41.  '"Saving file"
  42. "OS_File",10,out$,&FFF,,block%+4,block%+len%
  43.  '"File saved as '";out$;"'"
  44.